home *** CD-ROM | disk | FTP | other *** search
- //DELPHI.BTS for logging on to Delphi via Tymnet (20/20 plan).
- //Written by Bob Morrow (RMORROW) on Oct 7, 1991. Freeware. Use,
- //modify (PLEASE!), give it away, etc. as you wish. This assumes
- //you have Delphi set up to send you straight to the ST sig. I'm
- //just a very limited programmer; I can't yet figure out how to
- //write a (successful :) script that can read your mail (if any)
- //and then go back to the ST area. Modifications encouraged, but
- //please upload it so I can read your work and learn from it!
- //This isn't much more than a 20-line autologon sequence, but it's
- //a start.
-
- function main()
-
- //I have to give Tymnet a second or two to wake up here. Hence:
-
- wait(35);
-
- //(35) being 35 tenths of a second, or 3.5 seconds. Ok, let's
- //continue. BTW, 0 is infinite wait.
-
- port_puts("\r");
- wait_for("terminal identifier",0);
- port_puts("a");
- wait_for("please log in:",0);
- port_puts("d- \r");
- wait_for("Password:",0);
- port_puts(" \r");
-
- //At this point, you should be going to the ST sig. Skip through
- //all the announcements by typing n at the More? prompt.
-
- wait_for("More?",0);
- port_puts("n\r");
- wait_for("want to do?",0);
-
- //Let's say you want to go to the Recent Arrivals section of the
- //database.
-
- port_puts("da re\r");
- wait_for("Read, Set, Exit)",0);
- port_puts("r\r");
-
- //Let's just look at them, not List or Download them. We'll look
- //at 3 total.
-
- wait_for("Xm, List",0);
- port_puts("n\r");
- wait_for("Xm, List",0);
- port_puts("n\r");
- endfunction
-
- //You're on your own from here. I'd write a script that allows
- //for such variables as "You have a Forum message" or "You have X
- //Letters waiting" (i.e. to read them if there, if not, skip to next
- //function) but I can't seem to figure out how to deal with variables
- //like that that the host system puts in. Any help or rewrites
- //would be most welcome.
-